﻿using System.Collections.Generic;
using System.ServiceModel;
using CNF.Common.Base.SimpleOrm.Data;
using CNF.Common.Base.SimpleOrm.Domain;
using CNF.Common.Base.SimpleOrm.Entities;

namespace CNF.Common.Base.SimpleOrm.ServiceProxyies
{
    [ServiceContract]
    public interface IViewServiceProxy<DataKeyType,EntityType,DataServiceType,DomainType>  
        where DataKeyType : struct
        where EntityType : BaseEnity<DataKeyType>, new()
        where DataServiceType : BaseDataService<DataKeyType, EntityType>
        where DomainType : BaseDomain, new()
    {
        [OperationContract]
        DomainType LoadByID(DataKeyType dataKey);
        [OperationContract]
        bool Exists(object primaryKey);

        List<DomainType> QueryAll();

    }
}
